#ifndef QUESTIONCARD_H
#define QUESTIONCARD_H

#include <QWidget>
#include "model/data.h"

namespace Ui {
class QuestionCard;
}

class QuestionCard : public QWidget
{
    Q_OBJECT

public:
    explicit QuestionCard(QWidget *parent = nullptr);
    ~QuestionCard();

    void set(const model::QuestionInfo& question);
    void set(const model::QuestionClusterInfo& question);

signals:
    void clicked();

private:
    void init();
    void initStyleSheet();
    void initPanel();

    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;

private:
    Ui::QuestionCard *ui;
};

#endif // QUESTIONCARD_H
